<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>充值</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
<script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/layer/2.3/layer.js"></script>
<script src="/js/common/common.js"></script>
<link href="/css/common/common.css" rel="stylesheet" type="text/css">
<style type="text/css">
.please-selected-recharge-way {
	padding-top: 0.5rem;
	padding-left: 3rem;
	padding-bottom: 0.5rem;
}

.selected-recharge-way {
	float: right;
}

.selected-recharge-way i {
	color: #dc3545;
	font-size: 1.4rem;
}

.recharge-form {
	padding-left: 1rem;
	padding-right: 1rem;
	padding-top: 3rem;
}

.recharge-form .row {
	padding-bottom: 1rem;
}

.recharge-form-item label {
	text-align: end;
	width: 5rem;
	margin-right: 1rem;
}

.recharge-form-item input {
	border: 0;
	outline: none;
	border-bottom: 1px solid #35a79c;
}

.quick-input-amount {
	display: inline-block;
	text-align: center;
	border-radius: 6px;
	background: #fffaf7;
	border: 2px solid #ffecdf;
	color: #e4393c;
	width: 4rem;
	height: 2rem;
	line-height: 2rem;
	margin-right: 0.7rem;
	border-radius: 0.6rem;
}
</style>
</head>

<body>
	<div th:replace="common/header::html"></div>
	<div id="recharge" v-cloak>
		<div class="page-body">
			<div class="please-selected-recharge-way">请选择充值方式</div>
			<ul class="list-group">
				<li class="list-group-item" v-for="rechargeWay in rechargeWays" v-on:click="chooseRechargeWay(rechargeWay)">{{rechargeWay.rechargeWayName}}<span class="selected-recharge-way" v-show="selectedRechargeWay == rechargeWay"><i class="fa fa-check-circle" aria-hidden="true"></i></span></li>
			</ul>
			<div class="recharge-form">
				<div class="row">
					<div class="col-sm-9 offset-sm-3 recharge-form-item">
						<label>充值账号</label> <span>{{userName}}</span>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-9 offset-sm-3 recharge-form-item">
						<label>充值金额</label> <span><input type="number" class="recharge-amount-input-item" v-model="rechargeAmount"></span>元
					</div>
				</div>
				<div class="row">
					<div class="col-sm-9 offset-sm-3 recharge-form-item">
						<div class="quick-input-amount" v-on:click="rechargeAmount = 100">100</div>
						<div class="quick-input-amount" v-on:click="rechargeAmount = 300">300</div>
						<div class="quick-input-amount" v-on:click="rechargeAmount = 500">500</div>
						<div class="quick-input-amount" v-on:click="rechargeAmount = 5000">5000</div>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-9 offset-sm-3">
						<div class="alert alert-light" style="font-size: 14px; padding-top: 0px;">最低充值100元,最高充值50000元.单次充值额度:100~50000元</div>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-12">
						<button type="button" class="btn btn-success btn-lg btn-block" v-on:click="confirmRecharge">确认充值</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="/js/recharge.js"></script>
</body>
</html>